﻿using System;
using System.Collections.Generic;

namespace Meqs.Entity
{
    /// <summary>
    /// 教师权限
    /// </summary>
    [Serializable]
    public class TeacherRole
    {
        public TeacherRole(int mTeachID, int mRoleID)
        {
            m_TeachID = mTeachID;
            m_RoleID = mRoleID;
        }

        public TeacherRole()
        {
            m_TeachID = 0;
            m_RoleID = 0;

        }

        #region TeachID

        private int m_TeachID;

        public int TeachID
        {
            get { return m_TeachID; }
            set { m_TeachID = value; }
        }

        #endregion

        #region RoleID

        private int m_RoleID;

        public int RoleID
        {
            get { return m_RoleID; }
            set { m_RoleID = value; }
        }

        #endregion



        #region Rewrite Equals and HashCode

        /// <summary>
        /// 
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            if ((obj == null) || (obj.GetType() != GetType())) return false;
            TeacherRole castObj = (TeacherRole)obj;
            return (castObj != null)
 && m_TeachID == castObj.TeachID && m_RoleID == castObj.RoleID;
        }

        /// <summary>
        /// 用唯一值实现GetHashCode
        /// </summary>
        public override int GetHashCode()
        {
            int hash = 3;
            hash = hash * 3
 * m_TeachID.GetHashCode() * m_RoleID.GetHashCode(); return hash;
        }

        #endregion


    }
}